﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Web;

namespace SHDM.Web.Infrastructure
{
    public class HPrincipal : IPrincipal
    {
        private IIdentity _Identity;
        public HPrincipal(IIdentity _Identity)
        {
            this._Identity = _Identity;
        }
        public IIdentity Identity
        {
            get
            {
                return _Identity;
            }
        }

        public bool IsInRole(string role)
        {
            return ((HIdentity)this.Identity).AccountInfo.Role == role;
        }
        
    }
}